package cn.ren.hai.base.service.impl;

import cn.ren.hai.core.entity.QueryPage;
import cn.ren.hai.base.entity.RhFile;;
import cn.ren.hai.base.mapper.RhFileMapper;
import cn.ren.hai.base.service.RhFileService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.stereotype.Service;
import com.github.pagehelper.PageHelper;
import cn.ren.hai.core.entity.PageInfo;

/**
 * <p>
 * 文件 服务实现类
 * </p>
 *
 * @author wangdao
 * @since 2022-01-07
 */
@Service
public class RhFileServiceImpl extends ServiceImpl<RhFileMapper, RhFile> implements RhFileService {

   private final RhFileMapper rhFileMapper;


   public  RhFileServiceImpl(RhFileMapper rhFileMapper) {
     this.rhFileMapper = rhFileMapper;
   }

   @Override
   public PageInfo<RhFile> list(QueryPage<RhFile> page) {
     QueryWrapper<RhFile> queryWrapper = new QueryWrapper<>();
     PageHelper.startPage(page);
     return new PageInfo<>(rhFileMapper.selectList(queryWrapper));
   }
}
